﻿<%@ Page Language="C#" %>

    <table width='100%' align='center' border="0" style='text-align:center'>
    <tr>
    <td>Mã</td>
    <td>Tên Đăng Nhập</td>
    <td>Họ Tên</td>
    <td>Email</td>
    <td>Trạng Thái</td>
    <td>Chức Vụ</td>
    <td colspan='3'></td>
    </tr>
    
<%
    System.Collections.Generic.List<DTO.NguoiDungDto> nguoidung =
        BUS.NguoiDungBus.LayTatCaNguoiDung();
    System.Collections.Generic.List<DTO.LoaiNguoiDungDto> loainguoidung =
        BUS.LoaiNguoiDungBus.layDanhSachLoaiNguoiDung();
    

    for (int i = 0; i < nguoidung.Count; i++)
    {
          
        
%>
          <tr id="<%= nguoidung[i].Ma %>1">


          <td><%= nguoidung[i].Ma %></td>
          <td><%= nguoidung[i].TenDangNhap%></td>
          <td id='tdHoTen<%= nguoidung[i].Ma%>'><%=nguoidung[i].HoTen%></td>
<%          
          Response.Write("<td id='tdEmail" + nguoidung[i].Ma + "'>" + nguoidung[i].Email + "</td>");
          Response.Write("<td id='tdTrangThai" + nguoidung[i].Ma + "'>" + nguoidung[i].TrangThai + "</td>");
          Response.Write("<td id='tdChucVu" + nguoidung[i].Ma + "'>" + loainguoidung[nguoidung[i].LoaiNguoiDung-1].LoaiNguoiDung + "</td>");
          Response.Write("<td>" + "<input  value='Chi Tiết' type='button' onclick='showChiTietNguoiDung(" + nguoidung[i].Ma  +  ");'" + "</td>");
          Response.Write("<td>" + "<input  value='Reset Pass' type='button' onclick='resetPassNguoiDung(" + nguoidung[i].Ma + ",\"" + nguoidung[i].TenDangNhap + "\");'" + "</td>");
          Response.Write("<td>" + "<input  value='Xóa' type='button' onclick='deleteNguoiDung(" + nguoidung[i].Ma + ",\"" + nguoidung[i].TenDangNhap +  "\");'" + "</td>");
          Response.Write("</tr>");
        Response.Write("<tr id='" + nguoidung[i].Ma + "2'>");
        Response.Write("<td colspan='9'>" + "<div name='divChiTiet' id='divShow" + nguoidung[i].Ma + "'></div>" + "</td>");
        
        Response.Write("</tr>");
        
        
    }
    Response.Write("</table>");
%>
    